<?php
/**
 * StatusHistory.php
 *
 * @copyright   2023 thingsworld.com.cn - All Rights Reserved
 * @link        http://thingsworld.com.cn/
 * @author      stiffer.chen <chenl@thingsworld.com.cn>
 * @created     2023-02-18 16:38:39
 * @modified    2023-02-18 16:38:39
 *
 */

namespace App\Models\WorkOrder;

use App\Models\BaseModel;
use Carbon\Carbon;

class StatusHistory extends BaseModel
{
    protected $table = 'work_order_status_history';

    protected $fillable = [
        'status_order_id',
        'status'
    ];

    protected $appends = [
        'create_time_format',
        'update_time_format'
    ];

    public function getCreateTimeFormatAttribute()
    {
        return Carbon::parse($this->create_time)->toDateTimeString();
    }

    public function getUpdateTimeFormatAttribute()
    {
        return Carbon::parse($this->update_time)->toDateTimeString();
    }
}